/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.rpc.isfd.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Set;

@Data
@Component
@ConfigurationProperties(prefix = "isfd.request.config")
public class IsfdRequestConfig {
    private String protocol;
    private String host;
    private Integer port;
    private String username;
    private String password;
    private String grantType;
    private String tenantId;
    private String clientId;
    private Boolean rememberMe;
    private Set<String> excludedUris;

    /**
     * 拼接一下请求路径前缀
     */
    public String getPreUrl() {
        return String.format("%s://%s:%d", protocol, host, port);
    }
}
